package io.github.talelin.latticy.dto.spu;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author lms
 * @date 2021/4/27 21:44
 * @description
 */
@Data
public class SpuDTO {
    @NotNull
    @Min(0)
    private Integer uid;
    @NotBlank
    private String title;
    @NotBlank
    private String description;
    @NotBlank
    private String img;
    private Integer online = 1;
    @Range(min = 0,message = "商品发布价格错误！")
    private BigDecimal price;
    @NotBlank
    private String tags;
}